<?xml version='1.0' encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <link href="cpip.css" rel="stylesheet" type="text/css" />
    <title>File: /Users/paulross/dev/linux/linux-3.13/arch/x86/include/asm/thread_info.h</title>
  </head>
  <body>
    <h1>File: /Users/paulross/dev/linux/linux-3.13/arch/x86/include/asm/thread_info.h</h1>
    <p>Green shading in the line number column
means the source is part of the translation unit, red means it is conditionally excluded.
Highlighted line numbers link to the translation unit page. Highlighted macros link to
the macro page.</p>
    <pre><a name="1" /><span class="True">       1:</span> <span class="k">/* thread_info.h: low-level thread information</span>
<a name="2" /><span class="True">       2:</span> <span class="k"> *</span>
<a name="3" /><span class="True">       3:</span> <span class="k"> * Copyright (C) 2002  David Howells (dhowells@redhat.com)</span>
<a name="4" /><span class="True">       4:</span> <span class="k"> * - Incorporating suggestions made by Linus Torvalds and Dave Miller</span>
<a name="5" /><span class="True">       5:</span> <span class="k"> */</span>
<a name="6" /><span class="True">       6:</span> 
<a name="7" /><span class="Maybe">       7:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="cpu.c_macros_ref.html#_X0FTTV9YODZfVEhSRUFEX0lORk9fSF8w"><span class="b">_ASM_X86_THREAD_INFO_H</span></a>
<a name="8" /><span class="Maybe">       8:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_X0FTTV9YODZfVEhSRUFEX0lORk9fSF8w"><span class="b">_ASM_X86_THREAD_INFO_H</span></a>
<a name="9" /><span class="Maybe">       9:</span> 
<a name="10" /><span class="Maybe">      10:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">compiler</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="11" /><span class="Maybe">      11:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><span class="b">page</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="12" /><span class="Maybe">      12:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><span class="b">types</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="13" /><span class="Maybe">      13:</span> 
<a name="14" /><span class="Maybe">      14:</span> <span class="k">/*</span>
<a name="15" /><span class="Maybe">      15:</span> <span class="k"> * low level task data that entry.S needs immediate access to</span>
<a name="16" /><span class="Maybe">      16:</span> <span class="k"> * - this struct should fit entirely inside of one cache line</span>
<a name="17" /><span class="Maybe">      17:</span> <span class="k"> * - this struct shares the supervisor stack pages</span>
<a name="18" /><span class="Maybe">      18:</span> <span class="k"> */</span>
<a name="19" /><span class="Maybe">      19:</span> <span class="f">#</span><span class="n">ifndef</span> <span class="b">__ASSEMBLY__</span>
<a name="20" /><span class="Maybe">      20:</span> <span class="m">struct</span> <span class="b">task_struct</span><span class="f">;</span>
<a name="21" /><span class="Maybe">      21:</span> <span class="m">struct</span> <span class="b">exec_domain</span><span class="f">;</span>
<a name="22" /><span class="Maybe">      22:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><span class="b">processor</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="23" /><span class="Maybe">      23:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">atomic</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="24" /><span class="Maybe">      24:</span> 
<a name="25" /><span class="Maybe">      25:</span> <span class="m">struct</span> <span class="b">thread_info</span> <span class="f">{</span>
<a name="26" /><span class="Maybe">      26:</span>     <span class="m">struct</span> <span class="b">task_struct</span>    <span class="f">*</span><span class="b">task</span><span class="f">;</span>        <span class="k">/* main task structure */</span>
<a name="27" /><span class="Maybe">      27:</span>     <span class="m">struct</span> <span class="b">exec_domain</span>    <span class="f">*</span><span class="b">exec_domain</span><span class="f">;</span>    <span class="k">/* execution domain */</span>
<a name="28" /><span class="Maybe">      28:</span>     <span class="b">__u32</span>            <span class="b">flags</span><span class="f">;</span>        <span class="k">/* low level flags */</span>
<a name="29" /><span class="Maybe">      29:</span>     <span class="b">__u32</span>            <span class="b">status</span><span class="f">;</span>        <span class="k">/* thread synchronous flags */</span>
<a name="30" /><span class="Maybe">      30:</span>     <span class="b">__u32</span>            <span class="b">cpu</span><span class="f">;</span>        <span class="k">/* current CPU */</span>
<a name="31" /><span class="Maybe">      31:</span>     <span class="m">int</span>            <span class="b">saved_preempt_count</span><span class="f">;</span>
<a name="32" /><span class="Maybe">      32:</span>     <span class="b">mm_segment_t</span>        <span class="b">addr_limit</span><span class="f">;</span>
<a name="33" /><span class="Maybe">      33:</span>     <span class="m">struct</span> <span class="b">restart_block</span>    <span class="b">restart_block</span><span class="f">;</span>
<a name="34" /><span class="Maybe">      34:</span>     <span class="m">void</span> <a href="cpu.c_macros_ref.html#_X191c2VyXzA_"><span class="b">__user</span></a>        <span class="f">*</span><span class="b">sysenter_return</span><span class="f">;</span>
<a name="35" /><span class="False">      35:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_X86_32</span>
<a name="36" /><span class="False">      36:</span>     <span class="m">unsigned</span> <span class="m">long</span>           <span class="b">previous_esp</span><span class="f">;</span>   <span class="k">/* ESP of the previous stack in</span>
<a name="37" /><span class="False">      37:</span> <span class="k">                           case of nested (IRQ) stacks</span>
<a name="38" /><span class="False">      38:</span> <span class="k">                        */</span>
<a name="39" /><span class="False">      39:</span>     <span class="b">__u8</span>            <span class="b">supervisor_stack</span><span class="f">[</span><span class="c">0</span><span class="f">]</span><span class="f">;</span>
<a name="40" /><span class="Maybe">      40:</span> <span class="f">#</span><span class="n">endif</span>
<a name="41" /><span class="Maybe">      41:</span>     <span class="m">unsigned</span> <span class="m">int</span>        <span class="b">sig_on_uaccess_error</span><span class="f">:</span><span class="c">1</span><span class="f">;</span>
<a name="42" /><span class="Maybe">      42:</span>     <span class="m">unsigned</span> <span class="m">int</span>        <span class="b">uaccess_err</span><span class="f">:</span><span class="c">1</span><span class="f">;</span>    <span class="k">/* uaccess failed */</span>
<a name="43" /><span class="Maybe">      43:</span> <span class="f">}</span><span class="f">;</span>
<a name="44" /><span class="Maybe">      44:</span> 
<a name="45" /><span class="Maybe">      45:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SU5JVF9USFJFQURfSU5GT18w"><span class="b">INIT_THREAD_INFO</span></a><span class="f">(</span><span class="b">tsk</span><span class="f">)</span>            \
<a name="46" /><span class="Maybe">      46:</span> <span class="f">{</span>                        \
<a name="47" /><span class="Maybe">      47:</span>     <span class="f">.</span><span class="b">task</span>        <span class="f">=</span> <span class="f">&amp;</span><span class="b">tsk</span><span class="f">,</span>            \
<a name="48" /><span class="Maybe">      48:</span>     <span class="f">.</span><span class="b">exec_domain</span>    <span class="f">=</span> <span class="f">&amp;</span><span class="b">default_exec_domain</span><span class="f">,</span>    \
<a name="49" /><span class="Maybe">      49:</span>     <span class="f">.</span><span class="b">flags</span>        <span class="f">=</span> <span class="c">0</span><span class="f">,</span>            \
<a name="50" /><span class="Maybe">      50:</span>     <span class="f">.</span><span class="b">cpu</span>        <span class="f">=</span> <span class="c">0</span><span class="f">,</span>            \
<a name="51" /><span class="Maybe">      51:</span>     <span class="f">.</span><span class="b">saved_preempt_count</span> <span class="f">=</span> <a href="cpu.c_macros_noref.html#_SU5JVF9QUkVFTVBUX0NPVU5UXzA_"><span class="b">INIT_PREEMPT_COUNT</span></a><span class="f">,</span>    \
<a name="52" /><span class="Maybe">      52:</span>     <span class="f">.</span><span class="b">addr_limit</span>    <span class="f">=</span> <a href="cpu.c_macros_noref.html#_S0VSTkVMX0RTXzA_"><span class="b">KERNEL_DS</span></a><span class="f">,</span>        \
<a name="53" /><span class="Maybe">      53:</span>     <span class="f">.</span><span class="b">restart_block</span> <span class="f">=</span> <span class="f">{</span>            \
<a name="54" /><span class="Maybe">      54:</span>         <span class="f">.</span><span class="b">fn</span> <span class="f">=</span> <span class="b">do_no_restart_syscall</span><span class="f">,</span>    \
<a name="55" /><span class="Maybe">      55:</span>     <span class="f">}</span><span class="f">,</span>                    \
<a name="56" /><span class="Maybe">      56:</span> <span class="f">}</span>
<a name="57" /><span class="Maybe">      57:</span> 
<a name="58" /><span class="Maybe">      58:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_aW5pdF90aHJlYWRfaW5mb18w"><span class="b">init_thread_info</span></a>    <span class="f">(</span><span class="b">init_thread_union</span><span class="f">.</span><span class="b">thread_info</span><span class="f">)</span>
<a name="59" /><span class="Maybe">      59:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_aW5pdF9zdGFja18w"><span class="b">init_stack</span></a>        <span class="f">(</span><span class="b">init_thread_union</span><span class="f">.</span><span class="b">stack</span><span class="f">)</span>
<a name="60" /><span class="Maybe">      60:</span> 
<a name="61" /><span class="False">      61:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* !__ASSEMBLY__ */</span>
<a name="62" /><span class="False">      62:</span> 
<a name="63" /><span class="False">      63:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><span class="m">asm</span><span class="f">-</span><span class="b">offsets</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="64" /><span class="False">      64:</span> 
<a name="65" /><span class="Maybe">      65:</span> <span class="f">#</span><span class="n">endif</span>
<a name="66" /><span class="Maybe">      66:</span> 
<a name="67" /><span class="Maybe">      67:</span> <span class="k">/*</span>
<a name="68" /><span class="Maybe">      68:</span> <span class="k"> * thread information flags</span>
<a name="69" /><span class="Maybe">      69:</span> <span class="k"> * - these are process state flags that various assembly files</span>
<a name="70" /><span class="Maybe">      70:</span> <span class="k"> *   may need to access</span>
<a name="71" /><span class="Maybe">      71:</span> <span class="k"> * - pending work-to-be-done flags are in LSW</span>
<a name="72" /><span class="Maybe">      72:</span> <span class="k"> * - other flags in MSW</span>
<a name="73" /><span class="Maybe">      73:</span> <span class="k"> * Warning: layout of LSW is hardcoded in entry.S</span>
<a name="74" /><span class="Maybe">      74:</span> <span class="k"> */</span>
<a name="75" /><span class="Maybe">      75:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX1NZU0NBTExfVFJBQ0VfMA__"><span class="b">TIF_SYSCALL_TRACE</span></a>    <span class="c">0</span>    <span class="k">/* syscall trace active */</span>
<a name="76" /><span class="Maybe">      76:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX05PVElGWV9SRVNVTUVfMA__"><span class="b">TIF_NOTIFY_RESUME</span></a>    <span class="c">1</span>    <span class="k">/* callback before returning to user */</span>
<a name="77" /><span class="Maybe">      77:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_VElGX1NJR1BFTkRJTkdfMA__"><span class="b">TIF_SIGPENDING</span></a>        <span class="c">2</span>    <span class="k">/* signal pending */</span>
<a name="78" /><span class="Maybe">      78:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_VElGX05FRURfUkVTQ0hFRF8w"><span class="b">TIF_NEED_RESCHED</span></a>    <span class="c">3</span>    <span class="k">/* rescheduling necessary */</span>
<a name="79" /><span class="Maybe">      79:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX1NJTkdMRVNURVBfMA__"><span class="b">TIF_SINGLESTEP</span></a>        <span class="c">4</span>    <span class="k">/* reenable singlestep on user return*/</span>
<a name="80" /><span class="Maybe">      80:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX1NZU0NBTExfRU1VXzA_"><span class="b">TIF_SYSCALL_EMU</span></a>        <span class="c">6</span>    <span class="k">/* syscall emulation active */</span>
<a name="81" /><span class="Maybe">      81:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX1NZU0NBTExfQVVESVRfMA__"><span class="b">TIF_SYSCALL_AUDIT</span></a>    <span class="c">7</span>    <span class="k">/* syscall auditing active */</span>
<a name="82" /><span class="Maybe">      82:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_VElGX1NFQ0NPTVBfMA__"><span class="b">TIF_SECCOMP</span></a>        <span class="c">8</span>    <span class="k">/* secure computing */</span>
<a name="83" /><span class="Maybe">      83:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX01DRV9OT1RJRllfMA__"><span class="b">TIF_MCE_NOTIFY</span></a>        <span class="c">10</span>    <span class="k">/* notify userspace of an MCE */</span>
<a name="84" /><span class="Maybe">      84:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX1VTRVJfUkVUVVJOX05PVElGWV8w"><span class="b">TIF_USER_RETURN_NOTIFY</span></a>    <span class="c">11</span>    <span class="k">/* notify kernel of userspace return */</span>
<a name="85" /><span class="Maybe">      85:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX1VQUk9CRV8w"><span class="b">TIF_UPROBE</span></a>        <span class="c">12</span>    <span class="k">/* breakpointed or singlestepping */</span>
<a name="86" /><span class="Maybe">      86:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX05PVFNDXzA_"><span class="b">TIF_NOTSC</span></a>        <span class="c">16</span>    <span class="k">/* TSC is not accessible in userland */</span>
<a name="87" /><span class="Maybe">      87:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX0lBMzJfMA__"><span class="b">TIF_IA32</span></a>        <span class="c">17</span>    <span class="k">/* IA32 compatibility process */</span>
<a name="88" /><span class="Maybe">      88:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX0ZPUktfMA__"><span class="b">TIF_FORK</span></a>        <span class="c">18</span>    <span class="k">/* ret_from_fork */</span>
<a name="89" /><span class="Maybe">      89:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX05PSFpfMA__"><span class="b">TIF_NOHZ</span></a>        <span class="c">19</span>    <span class="k">/* in adaptive nohz mode */</span>
<a name="90" /><span class="Maybe">      90:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX01FTURJRV8w"><span class="b">TIF_MEMDIE</span></a>        <span class="c">20</span>    <span class="k">/* is terminating due to OOM killer */</span>
<a name="91" /><span class="Maybe">      91:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX0lPX0JJVE1BUF8w"><span class="b">TIF_IO_BITMAP</span></a>        <span class="c">22</span>    <span class="k">/* uses I/O bitmap */</span>
<a name="92" /><span class="Maybe">      92:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX0ZPUkNFRF9URl8w"><span class="b">TIF_FORCED_TF</span></a>        <span class="c">24</span>    <span class="k">/* true if TF in eflags artificially */</span>
<a name="93" /><span class="Maybe">      93:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX0JMT0NLU1RFUF8w"><span class="b">TIF_BLOCKSTEP</span></a>        <span class="c">25</span>    <span class="k">/* set when we want DEBUGCTLMSR_BTF */</span>
<a name="94" /><span class="Maybe">      94:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX0xBWllfTU1VX1VQREFURVNfMA__"><span class="b">TIF_LAZY_MMU_UPDATES</span></a>    <span class="c">27</span>    <span class="k">/* task is updating the mmu lazily */</span>
<a name="95" /><span class="Maybe">      95:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX1NZU0NBTExfVFJBQ0VQT0lOVF8w"><span class="b">TIF_SYSCALL_TRACEPOINT</span></a>    <span class="c">28</span>    <span class="k">/* syscall tracepoint instrumentation */</span>
<a name="96" /><span class="Maybe">      96:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX0FERFIzMl8w"><span class="b">TIF_ADDR32</span></a>        <span class="c">29</span>    <span class="k">/* 32-bit address space on 64 bits */</span>
<a name="97" /><span class="Maybe">      97:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_VElGX1gzMl8w"><span class="b">TIF_X32</span></a>            <span class="c">30</span>    <span class="k">/* 32-bit native x86-64 binary */</span>
<a name="98" /><span class="Maybe">      98:</span> 
<a name="99" /><span class="Maybe">      99:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9TWVNDQUxMX1RSQUNFXzA_"><span class="b">_TIF_SYSCALL_TRACE</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX1NZU0NBTExfVFJBQ0VfMA__"><span class="b">TIF_SYSCALL_TRACE</span></a><span class="f">)</span>
<a name="100" /><span class="Maybe">     100:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9OT1RJRllfUkVTVU1FXzA_"><span class="b">_TIF_NOTIFY_RESUME</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX05PVElGWV9SRVNVTUVfMA__"><span class="b">TIF_NOTIFY_RESUME</span></a><span class="f">)</span>
<a name="101" /><span class="Maybe">     101:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9TSUdQRU5ESU5HXzA_"><span class="b">_TIF_SIGPENDING</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_ref.html#_VElGX1NJR1BFTkRJTkdfMA__"><span class="b">TIF_SIGPENDING</span></a><span class="f">)</span>
<a name="102" /><span class="Maybe">     102:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9TSU5HTEVTVEVQXzA_"><span class="b">_TIF_SINGLESTEP</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX1NJTkdMRVNURVBfMA__"><span class="b">TIF_SINGLESTEP</span></a><span class="f">)</span>
<a name="103" /><span class="Maybe">     103:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9ORUVEX1JFU0NIRURfMA__"><span class="b">_TIF_NEED_RESCHED</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_ref.html#_VElGX05FRURfUkVTQ0hFRF8w"><span class="b">TIF_NEED_RESCHED</span></a><span class="f">)</span>
<a name="104" /><span class="Maybe">     104:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9TWVNDQUxMX0VNVV8w"><span class="b">_TIF_SYSCALL_EMU</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX1NZU0NBTExfRU1VXzA_"><span class="b">TIF_SYSCALL_EMU</span></a><span class="f">)</span>
<a name="105" /><span class="Maybe">     105:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9TWVNDQUxMX0FVRElUXzA_"><span class="b">_TIF_SYSCALL_AUDIT</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX1NZU0NBTExfQVVESVRfMA__"><span class="b">TIF_SYSCALL_AUDIT</span></a><span class="f">)</span>
<a name="106" /><span class="Maybe">     106:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9TRUNDT01QXzA_"><span class="b">_TIF_SECCOMP</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_ref.html#_VElGX1NFQ0NPTVBfMA__"><span class="b">TIF_SECCOMP</span></a><span class="f">)</span>
<a name="107" /><span class="Maybe">     107:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9NQ0VfTk9USUZZXzA_"><span class="b">_TIF_MCE_NOTIFY</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX01DRV9OT1RJRllfMA__"><span class="b">TIF_MCE_NOTIFY</span></a><span class="f">)</span>
<a name="108" /><span class="Maybe">     108:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9VU0VSX1JFVFVSTl9OT1RJRllfMA__"><span class="b">_TIF_USER_RETURN_NOTIFY</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX1VTRVJfUkVUVVJOX05PVElGWV8w"><span class="b">TIF_USER_RETURN_NOTIFY</span></a><span class="f">)</span>
<a name="109" /><span class="Maybe">     109:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9VUFJPQkVfMA__"><span class="b">_TIF_UPROBE</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX1VQUk9CRV8w"><span class="b">TIF_UPROBE</span></a><span class="f">)</span>
<a name="110" /><span class="Maybe">     110:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9OT1RTQ18w"><span class="b">_TIF_NOTSC</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX05PVFNDXzA_"><span class="b">TIF_NOTSC</span></a><span class="f">)</span>
<a name="111" /><span class="Maybe">     111:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9JQTMyXzA_"><span class="b">_TIF_IA32</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX0lBMzJfMA__"><span class="b">TIF_IA32</span></a><span class="f">)</span>
<a name="112" /><span class="Maybe">     112:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9GT1JLXzA_"><span class="b">_TIF_FORK</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX0ZPUktfMA__"><span class="b">TIF_FORK</span></a><span class="f">)</span>
<a name="113" /><span class="Maybe">     113:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9OT0haXzA_"><span class="b">_TIF_NOHZ</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX05PSFpfMA__"><span class="b">TIF_NOHZ</span></a><span class="f">)</span>
<a name="114" /><span class="Maybe">     114:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9JT19CSVRNQVBfMA__"><span class="b">_TIF_IO_BITMAP</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX0lPX0JJVE1BUF8w"><span class="b">TIF_IO_BITMAP</span></a><span class="f">)</span>
<a name="115" /><span class="Maybe">     115:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9GT1JDRURfVEZfMA__"><span class="b">_TIF_FORCED_TF</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX0ZPUkNFRF9URl8w"><span class="b">TIF_FORCED_TF</span></a><span class="f">)</span>
<a name="116" /><span class="Maybe">     116:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9CTE9DS1NURVBfMA__"><span class="b">_TIF_BLOCKSTEP</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX0JMT0NLU1RFUF8w"><span class="b">TIF_BLOCKSTEP</span></a><span class="f">)</span>
<a name="117" /><span class="Maybe">     117:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9MQVpZX01NVV9VUERBVEVTXzA_"><span class="b">_TIF_LAZY_MMU_UPDATES</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX0xBWllfTU1VX1VQREFURVNfMA__"><span class="b">TIF_LAZY_MMU_UPDATES</span></a><span class="f">)</span>
<a name="118" /><span class="Maybe">     118:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9TWVNDQUxMX1RSQUNFUE9JTlRfMA__"><span class="b">_TIF_SYSCALL_TRACEPOINT</span></a>    <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX1NZU0NBTExfVFJBQ0VQT0lOVF8w"><span class="b">TIF_SYSCALL_TRACEPOINT</span></a><span class="f">)</span>
<a name="119" /><span class="Maybe">     119:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9BRERSMzJfMA__"><span class="b">_TIF_ADDR32</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX0FERFIzMl8w"><span class="b">TIF_ADDR32</span></a><span class="f">)</span>
<a name="120" /><span class="Maybe">     120:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9YMzJfMA__"><span class="b">_TIF_X32</span></a>        <span class="f">(</span><span class="c">1</span> <span class="f">&lt;&lt;</span> <a href="cpu.c_macros_noref.html#_VElGX1gzMl8w"><span class="b">TIF_X32</span></a><span class="f">)</span>
<a name="121" /><span class="Maybe">     121:</span> 
<a name="122" /><span class="Maybe">     122:</span> <span class="k">/* work to do in syscall_trace_enter() */</span>
<a name="123" /><span class="Maybe">     123:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9XT1JLX1NZU0NBTExfRU5UUllfMA__"><span class="b">_TIF_WORK_SYSCALL_ENTRY</span></a>    \
<a name="124" /><span class="Maybe">     124:</span>     <span class="f">(</span><a href="cpu.c_macros_noref.html#_X1RJRl9TWVNDQUxMX1RSQUNFXzA_"><span class="b">_TIF_SYSCALL_TRACE</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_X1RJRl9TWVNDQUxMX0VNVV8w"><span class="b">_TIF_SYSCALL_EMU</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_X1RJRl9TWVNDQUxMX0FVRElUXzA_"><span class="b">_TIF_SYSCALL_AUDIT</span></a> <span class="f">|</span>    \
<a name="125" /><span class="Maybe">     125:</span>      <a href="cpu.c_macros_noref.html#_X1RJRl9TRUNDT01QXzA_"><span class="b">_TIF_SECCOMP</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_X1RJRl9TSU5HTEVTVEVQXzA_"><span class="b">_TIF_SINGLESTEP</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_X1RJRl9TWVNDQUxMX1RSQUNFUE9JTlRfMA__"><span class="b">_TIF_SYSCALL_TRACEPOINT</span></a> <span class="f">|</span>    \
<a name="126" /><span class="Maybe">     126:</span>      <a href="cpu.c_macros_noref.html#_X1RJRl9OT0haXzA_"><span class="b">_TIF_NOHZ</span></a><span class="f">)</span>
<a name="127" /><span class="Maybe">     127:</span> 
<a name="128" /><span class="Maybe">     128:</span> <span class="k">/* work to do in syscall_trace_leave() */</span>
<a name="129" /><span class="Maybe">     129:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9XT1JLX1NZU0NBTExfRVhJVF8w"><span class="b">_TIF_WORK_SYSCALL_EXIT</span></a>    \
<a name="130" /><span class="Maybe">     130:</span>     <span class="f">(</span><a href="cpu.c_macros_noref.html#_X1RJRl9TWVNDQUxMX1RSQUNFXzA_"><span class="b">_TIF_SYSCALL_TRACE</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_X1RJRl9TWVNDQUxMX0FVRElUXzA_"><span class="b">_TIF_SYSCALL_AUDIT</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_X1RJRl9TSU5HTEVTVEVQXzA_"><span class="b">_TIF_SINGLESTEP</span></a> <span class="f">|</span>    \
<a name="131" /><span class="Maybe">     131:</span>      <a href="cpu.c_macros_noref.html#_X1RJRl9TWVNDQUxMX1RSQUNFUE9JTlRfMA__"><span class="b">_TIF_SYSCALL_TRACEPOINT</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_X1RJRl9OT0haXzA_"><span class="b">_TIF_NOHZ</span></a><span class="f">)</span>
<a name="132" /><span class="Maybe">     132:</span> 
<a name="133" /><span class="Maybe">     133:</span> <span class="k">/* work to do on interrupt/exception return */</span>
<a name="134" /><span class="Maybe">     134:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9XT1JLX01BU0tfMA__"><span class="b">_TIF_WORK_MASK</span></a>                            \
<a name="135" /><span class="Maybe">     135:</span>     <span class="f">(</span><span class="c">0x0000FFFF</span> <span class="f">&amp;</span>                            \
<a name="136" /><span class="Maybe">     136:</span>      <span class="f">~</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_X1RJRl9TWVNDQUxMX1RSQUNFXzA_"><span class="b">_TIF_SYSCALL_TRACE</span></a><span class="f">|</span><a href="cpu.c_macros_noref.html#_X1RJRl9TWVNDQUxMX0FVRElUXzA_"><span class="b">_TIF_SYSCALL_AUDIT</span></a><span class="f">|</span>            \
<a name="137" /><span class="Maybe">     137:</span>        <a href="cpu.c_macros_noref.html#_X1RJRl9TSU5HTEVTVEVQXzA_"><span class="b">_TIF_SINGLESTEP</span></a><span class="f">|</span><a href="cpu.c_macros_noref.html#_X1RJRl9TRUNDT01QXzA_"><span class="b">_TIF_SECCOMP</span></a><span class="f">|</span><a href="cpu.c_macros_noref.html#_X1RJRl9TWVNDQUxMX0VNVV8w"><span class="b">_TIF_SYSCALL_EMU</span></a><span class="f">)</span><span class="f">)</span>
<a name="138" /><span class="Maybe">     138:</span> 
<a name="139" /><span class="Maybe">     139:</span> <span class="k">/* work to do on any return to user space */</span>
<a name="140" /><span class="Maybe">     140:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9BTExXT1JLX01BU0tfMA__"><span class="b">_TIF_ALLWORK_MASK</span></a>                        \
<a name="141" /><span class="Maybe">     141:</span>     <span class="f">(</span><span class="f">(</span><span class="c">0x0000FFFF</span> <span class="f">&amp;</span> <span class="f">~</span><a href="cpu.c_macros_noref.html#_X1RJRl9TRUNDT01QXzA_"><span class="b">_TIF_SECCOMP</span></a><span class="f">)</span> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_X1RJRl9TWVNDQUxMX1RSQUNFUE9JTlRfMA__"><span class="b">_TIF_SYSCALL_TRACEPOINT</span></a> <span class="f">|</span>    \
<a name="142" /><span class="Maybe">     142:</span>     <a href="cpu.c_macros_noref.html#_X1RJRl9OT0haXzA_"><span class="b">_TIF_NOHZ</span></a><span class="f">)</span>
<a name="143" /><span class="Maybe">     143:</span> 
<a name="144" /><span class="Maybe">     144:</span> <span class="k">/* Only used for 64 bit */</span>
<a name="145" /><span class="Maybe">     145:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9ET19OT1RJRllfTUFTS18w"><span class="b">_TIF_DO_NOTIFY_MASK</span></a>                        \
<a name="146" /><span class="Maybe">     146:</span>     <span class="f">(</span><a href="cpu.c_macros_noref.html#_X1RJRl9TSUdQRU5ESU5HXzA_"><span class="b">_TIF_SIGPENDING</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_X1RJRl9NQ0VfTk9USUZZXzA_"><span class="b">_TIF_MCE_NOTIFY</span></a> <span class="f">|</span> <a href="cpu.c_macros_noref.html#_X1RJRl9OT1RJRllfUkVTVU1FXzA_"><span class="b">_TIF_NOTIFY_RESUME</span></a> <span class="f">|</span>    \
<a name="147" /><span class="Maybe">     147:</span>      <a href="cpu.c_macros_noref.html#_X1RJRl9VU0VSX1JFVFVSTl9OT1RJRllfMA__"><span class="b">_TIF_USER_RETURN_NOTIFY</span></a><span class="f">)</span>
<a name="148" /><span class="Maybe">     148:</span> 
<a name="149" /><span class="Maybe">     149:</span> <span class="k">/* flags to check in __switch_to() */</span>
<a name="150" /><span class="Maybe">     150:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9XT1JLX0NUWFNXXzA_"><span class="b">_TIF_WORK_CTXSW</span></a>                            \
<a name="151" /><span class="Maybe">     151:</span>     <span class="f">(</span><a href="cpu.c_macros_noref.html#_X1RJRl9JT19CSVRNQVBfMA__"><span class="b">_TIF_IO_BITMAP</span></a><span class="f">|</span><a href="cpu.c_macros_noref.html#_X1RJRl9OT1RTQ18w"><span class="b">_TIF_NOTSC</span></a><span class="f">|</span><a href="cpu.c_macros_noref.html#_X1RJRl9CTE9DS1NURVBfMA__"><span class="b">_TIF_BLOCKSTEP</span></a><span class="f">)</span>
<a name="152" /><span class="Maybe">     152:</span> 
<a name="153" /><span class="Maybe">     153:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9XT1JLX0NUWFNXX1BSRVZfMA__"><span class="b">_TIF_WORK_CTXSW_PREV</span></a> <span class="f">(</span><a href="cpu.c_macros_noref.html#_X1RJRl9XT1JLX0NUWFNXXzA_"><span class="b">_TIF_WORK_CTXSW</span></a><span class="f">|</span><a href="cpu.c_macros_noref.html#_X1RJRl9VU0VSX1JFVFVSTl9OT1RJRllfMA__"><span class="b">_TIF_USER_RETURN_NOTIFY</span></a><span class="f">)</span>
<a name="154" /><span class="Maybe">     154:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X1RJRl9XT1JLX0NUWFNXX05FWFRfMA__"><span class="b">_TIF_WORK_CTXSW_NEXT</span></a> <span class="f">(</span><a href="cpu.c_macros_noref.html#_X1RJRl9XT1JLX0NUWFNXXzA_"><span class="b">_TIF_WORK_CTXSW</span></a><span class="f">)</span>
<a name="155" /><span class="Maybe">     155:</span> 
<a name="156" /><span class="False">     156:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_X86_32</span>
<a name="157" /><span class="False">     157:</span> 
<a name="158" /><span class="False">     158:</span> <span class="f">#</span><span class="n">define</span> <span class="b">STACK_WARN</span>    <span class="f">(</span><a href="cpu.c_macros_ref.html#_VEhSRUFEX1NJWkVfMA__"><span class="b">THREAD_SIZE</span></a><span class="f">/</span><span class="c">8</span><span class="f">)</span>
<a name="159" /><span class="False">     159:</span> <span class="k">/*</span>
<a name="160" /><span class="False">     160:</span> <span class="k"> * macros/functions for gaining access to the thread information structure</span>
<a name="161" /><span class="False">     161:</span> <span class="k"> *</span>
<a name="162" /><span class="False">     162:</span> <span class="k"> * preempt_count needs to be 1 initially, until the scheduler is functional.</span>
<a name="163" /><span class="False">     163:</span> <span class="k"> */</span>
<a name="164" /><span class="False">     164:</span> <span class="f">#</span><span class="n">ifndef</span> <span class="b">__ASSEMBLY__</span>
<a name="165" /><span class="False">     165:</span> 
<a name="166" /><span class="False">     166:</span> 
<a name="167" /><span class="False">     167:</span> <span class="k">/* how to get the current stack pointer from C */</span>
<a name="168" /><span class="False">     168:</span> <span class="m">register</span> <span class="m">unsigned</span> <span class="m">long</span> <span class="b">current_stack_pointer</span> <span class="m">asm</span><span class="f">(</span><span class="e">&quot;esp&quot;</span><span class="f">)</span> <a href="cpu.c_macros_ref.html#_X191c2VkXzA_"><span class="b">__used</span></a><span class="f">;</span>
<a name="169" /><span class="False">     169:</span> 
<a name="170" /><span class="False">     170:</span> <span class="k">/* how to get the thread information struct from C */</span>
<a name="171" /><span class="False">     171:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">struct</span> <span class="b">thread_info</span> <span class="f">*</span><span class="b">current_thread_info</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="172" /><span class="False">     172:</span> <span class="f">{</span>
<a name="173" /><span class="False">     173:</span>     <span class="m">return</span> <span class="f">(</span><span class="m">struct</span> <span class="b">thread_info</span> <span class="f">*</span><span class="f">)</span>
<a name="174" /><span class="False">     174:</span>         <span class="f">(</span><span class="b">current_stack_pointer</span> <span class="f">&amp;</span> <span class="f">~</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_VEhSRUFEX1NJWkVfMA__"><span class="b">THREAD_SIZE</span></a> <span class="f">-</span> <span class="c">1</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="175" /><span class="False">     175:</span> <span class="f">}</span>
<a name="176" /><span class="False">     176:</span> 
<a name="177" /><span class="False">     177:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* !__ASSEMBLY__ */</span>
<a name="178" /><span class="False">     178:</span> 
<a name="179" /><span class="False">     179:</span> <span class="k">/* how to get the thread information struct from ASM */</span>
<a name="180" /><span class="False">     180:</span> <span class="f">#</span><span class="n">define</span> <span class="b">GET_THREAD_INFO</span><span class="f">(</span><span class="b">reg</span><span class="f">)</span>     \
<a name="181" /><span class="False">     181:</span>     <span class="b">movl</span> <span class="g">$</span><span class="f">-</span><a href="cpu.c_macros_ref.html#_VEhSRUFEX1NJWkVfMA__"><span class="b">THREAD_SIZE</span></a><span class="f">,</span> <span class="b">reg</span><span class="f">;</span> \
<a name="182" /><span class="False">     182:</span>     <span class="b">andl</span> <span class="f">%</span><span class="b">esp</span><span class="f">,</span> <span class="b">reg</span>
<a name="183" /><span class="False">     183:</span> 
<a name="184" /><span class="False">     184:</span> <span class="k">/* use this one if reg already contains %esp */</span>
<a name="185" /><span class="False">     185:</span> <span class="f">#</span><span class="n">define</span> <span class="b">GET_THREAD_INFO_WITH_ESP</span><span class="f">(</span><span class="b">reg</span><span class="f">)</span> \
<a name="186" /><span class="False">     186:</span>     <span class="b">andl</span> <span class="g">$</span><span class="f">-</span><a href="cpu.c_macros_ref.html#_VEhSRUFEX1NJWkVfMA__"><span class="b">THREAD_SIZE</span></a><span class="f">,</span> <span class="b">reg</span>
<a name="187" /><span class="False">     187:</span> 
<a name="188" /><span class="False">     188:</span> <span class="f">#</span><span class="n">endif</span>
<a name="189" /><span class="False">     189:</span> 
<a name="190" /><span class="Maybe">     190:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* X86_32 */</span>
<a name="191" /><span class="Maybe">     191:</span> 
<a name="192" /><span class="Maybe">     192:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="m">asm</span><span class="f">/</span><span class="b">percpu</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="193" /><span class="Maybe">     193:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_S0VSTkVMX1NUQUNLX09GRlNFVF8w"><span class="b">KERNEL_STACK_OFFSET</span></a> <span class="f">(</span><span class="c">5</span><span class="f">*</span><span class="c">8</span><span class="f">)</span>
<a name="194" /><span class="Maybe">     194:</span> 
<a name="195" /><span class="Maybe">     195:</span> <span class="k">/*</span>
<a name="196" /><span class="Maybe">     196:</span> <span class="k"> * macros/functions for gaining access to the thread information structure</span>
<a name="197" /><span class="Maybe">     197:</span> <span class="k"> * preempt_count needs to be 1 initially, until the scheduler is functional.</span>
<a name="198" /><span class="Maybe">     198:</span> <span class="k"> */</span>
<a name="199" /><span class="Maybe">     199:</span> <span class="f">#</span><span class="n">ifndef</span> <span class="b">__ASSEMBLY__</span>
<a name="200" /><span class="Maybe">     200:</span> <a href="cpu.c_macros_ref.html#_REVDTEFSRV9QRVJfQ1BVXzA_"><span class="b">DECLARE_PER_CPU</span></a><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span><span class="f">,</span> <span class="b">kernel_stack</span><span class="f">)</span><span class="f">;</span>
<a name="201" /><span class="Maybe">     201:</span> 
<a name="202" /><span class="Maybe">     202:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">struct</span> <span class="b">thread_info</span> <span class="f">*</span><span class="b">current_thread_info</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="203" /><span class="Maybe">     203:</span> <span class="f">{</span>
<a name="204" /><span class="Maybe">     204:</span>     <span class="m">struct</span> <span class="b">thread_info</span> <span class="f">*</span><span class="b">ti</span><span class="f">;</span>
<a name="205" /><span class="Maybe">     205:</span>     <span class="b">ti</span> <span class="f">=</span> <span class="f">(</span><span class="m">void</span> <span class="f">*</span><span class="f">)</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_dGhpc19jcHVfcmVhZF9zdGFibGVfMA__"><span class="b">this_cpu_read_stable</span></a><span class="f">(</span><span class="b">kernel_stack</span><span class="f">)</span> <span class="f">+</span>
<a name="206" /><span class="Maybe">     206:</span>               <a href="cpu.c_macros_ref.html#_S0VSTkVMX1NUQUNLX09GRlNFVF8w"><span class="b">KERNEL_STACK_OFFSET</span></a> <span class="f">-</span> <a href="cpu.c_macros_ref.html#_VEhSRUFEX1NJWkVfMA__"><span class="b">THREAD_SIZE</span></a><span class="f">)</span><span class="f">;</span>
<a name="207" /><span class="Maybe">     207:</span>     <span class="m">return</span> <span class="b">ti</span><span class="f">;</span>
<a name="208" /><span class="Maybe">     208:</span> <span class="f">}</span>
<a name="209" /><span class="Maybe">     209:</span> 
<a name="210" /><span class="False">     210:</span> <span class="f">#</span><span class="n">else</span> <span class="k">/* !__ASSEMBLY__ */</span>
<a name="211" /><span class="False">     211:</span> 
<a name="212" /><span class="False">     212:</span> <span class="k">/* how to get the thread information struct from ASM */</span>
<a name="213" /><span class="False">     213:</span> <span class="f">#</span><span class="n">define</span> <span class="b">GET_THREAD_INFO</span><span class="f">(</span><span class="b">reg</span><span class="f">)</span> \
<a name="214" /><span class="False">     214:</span>     <span class="b">movq</span> <span class="b">PER_CPU_VAR</span><span class="f">(</span><span class="b">kernel_stack</span><span class="f">)</span><span class="f">,</span><span class="b">reg</span> <span class="f">;</span> \
<a name="215" /><span class="False">     215:</span>     <span class="b">subq</span> <span class="g">$</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_VEhSRUFEX1NJWkVfMA__"><span class="b">THREAD_SIZE</span></a><span class="f">-</span><a href="cpu.c_macros_ref.html#_S0VSTkVMX1NUQUNLX09GRlNFVF8w"><span class="b">KERNEL_STACK_OFFSET</span></a><span class="f">)</span><span class="f">,</span><span class="b">reg</span>
<a name="216" /><span class="False">     216:</span> 
<a name="217" /><span class="False">     217:</span> <span class="k">/*</span>
<a name="218" /><span class="False">     218:</span> <span class="k"> * Same if PER_CPU_VAR(kernel_stack) is, perhaps with some offset, already in</span>
<a name="219" /><span class="False">     219:</span> <span class="k"> * a certain register (to be used in assembler memory operands).</span>
<a name="220" /><span class="False">     220:</span> <span class="k"> */</span>
<a name="221" /><span class="False">     221:</span> <span class="f">#</span><span class="n">define</span> <span class="b">THREAD_INFO</span><span class="f">(</span><span class="b">reg</span><span class="f">,</span> <span class="b">off</span><span class="f">)</span> <a href="cpu.c_macros_ref.html#_S0VSTkVMX1NUQUNLX09GRlNFVF8w"><span class="b">KERNEL_STACK_OFFSET</span></a><span class="f">+</span><span class="f">(</span><span class="b">off</span><span class="f">)</span><span class="f">-</span><a href="cpu.c_macros_ref.html#_VEhSRUFEX1NJWkVfMA__"><span class="b">THREAD_SIZE</span></a><span class="f">(</span><span class="b">reg</span><span class="f">)</span>
<a name="222" /><span class="False">     222:</span> 
<a name="223" /><span class="Maybe">     223:</span> <span class="f">#</span><span class="n">endif</span>
<a name="224" /><span class="Maybe">     224:</span> 
<a name="225" /><span class="Maybe">     225:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* !X86_32 */</span>
<a name="226" /><span class="Maybe">     226:</span> 
<a name="227" /><span class="Maybe">     227:</span> <span class="k">/*</span>
<a name="228" /><span class="Maybe">     228:</span> <span class="k"> * Thread-synchronous status.</span>
<a name="229" /><span class="Maybe">     229:</span> <span class="k"> *</span>
<a name="230" /><span class="Maybe">     230:</span> <span class="k"> * This is different from the flags in that nobody else</span>
<a name="231" /><span class="Maybe">     231:</span> <span class="k"> * ever touches our thread-synchronous status, so we don&apos;t</span>
<a name="232" /><span class="Maybe">     232:</span> <span class="k"> * have to worry about atomic accesses.</span>
<a name="233" /><span class="Maybe">     233:</span> <span class="k"> */</span>
<a name="234" /><span class="Maybe">     234:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_VFNfQ09NUEFUXzA_"><span class="b">TS_COMPAT</span></a>        <span class="c">0x0002</span>    <span class="k">/* 32bit syscall active (64BIT)*/</span>
<a name="235" /><span class="Maybe">     235:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_VFNfUE9MTElOR18w"><span class="b">TS_POLLING</span></a>        <span class="c">0x0004</span>    <span class="k">/* idle task polling need_resched,</span>
<a name="236" /><span class="Maybe">     236:</span> <span class="k">                       skip sending interrupt */</span>
<a name="237" /><span class="Maybe">     237:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_VFNfUkVTVE9SRV9TSUdNQVNLXzA_"><span class="b">TS_RESTORE_SIGMASK</span></a>    <span class="c">0x0008</span>    <span class="k">/* restore signal mask in do_signal() */</span>
<a name="238" /><span class="Maybe">     238:</span> 
<a name="239" /><span class="Maybe">     239:</span> <span class="f">#</span><span class="n">ifndef</span> <span class="b">__ASSEMBLY__</span>
<a name="240" /><span class="Maybe">     240:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_SEFWRV9TRVRfUkVTVE9SRV9TSUdNQVNLXzA_"><span class="b">HAVE_SET_RESTORE_SIGMASK</span></a>    <span class="c">1</span>
<a name="241" /><span class="Maybe">     241:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">set_restore_sigmask</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="242" /><span class="Maybe">     242:</span> <span class="f">{</span>
<a name="243" /><span class="Maybe">     243:</span>     <span class="m">struct</span> <span class="b">thread_info</span> <span class="f">*</span><span class="b">ti</span> <span class="f">=</span> <span class="b">current_thread_info</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="244" /><span class="Maybe">     244:</span>     <span class="b">ti</span><span class="f">-&gt;</span><span class="b">status</span> <span class="f">|=</span> <a href="cpu.c_macros_ref.html#_VFNfUkVTVE9SRV9TSUdNQVNLXzA_"><span class="b">TS_RESTORE_SIGMASK</span></a><span class="f">;</span>
<a name="245" /><span class="Maybe">     245:</span>     <a href="cpu.c_macros_ref.html#_V0FSTl9PTl8w"><span class="b">WARN_ON</span></a><span class="f">(</span><span class="f">!</span><a href="cpu.c_macros_ref.html#_dGVzdF9iaXRfMA__"><span class="b">test_bit</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_VElGX1NJR1BFTkRJTkdfMA__"><span class="b">TIF_SIGPENDING</span></a><span class="f">,</span> <span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="f">)</span><span class="f">&amp;</span><span class="b">ti</span><span class="f">-&gt;</span><span class="b">flags</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="246" /><span class="Maybe">     246:</span> <span class="f">}</span>
<a name="247" /><span class="Maybe">     247:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">clear_restore_sigmask</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="248" /><span class="Maybe">     248:</span> <span class="f">{</span>
<a name="249" /><span class="Maybe">     249:</span>     <span class="b">current_thread_info</span><span class="f">(</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">status</span> <span class="f">&amp;=</span> <span class="f">~</span><a href="cpu.c_macros_ref.html#_VFNfUkVTVE9SRV9TSUdNQVNLXzA_"><span class="b">TS_RESTORE_SIGMASK</span></a><span class="f">;</span>
<a name="250" /><span class="Maybe">     250:</span> <span class="f">}</span>
<a name="251" /><span class="Maybe">     251:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">test_restore_sigmask</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="252" /><span class="Maybe">     252:</span> <span class="f">{</span>
<a name="253" /><span class="Maybe">     253:</span>     <span class="m">return</span> <span class="b">current_thread_info</span><span class="f">(</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">status</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_VFNfUkVTVE9SRV9TSUdNQVNLXzA_"><span class="b">TS_RESTORE_SIGMASK</span></a><span class="f">;</span>
<a name="254" /><span class="Maybe">     254:</span> <span class="f">}</span>
<a name="255" /><span class="Maybe">     255:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">test_and_clear_restore_sigmask</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="256" /><span class="Maybe">     256:</span> <span class="f">{</span>
<a name="257" /><span class="Maybe">     257:</span>     <span class="m">struct</span> <span class="b">thread_info</span> <span class="f">*</span><span class="b">ti</span> <span class="f">=</span> <span class="b">current_thread_info</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="258" /><span class="Maybe">     258:</span>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="f">(</span><span class="b">ti</span><span class="f">-&gt;</span><span class="b">status</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_VFNfUkVTVE9SRV9TSUdNQVNLXzA_"><span class="b">TS_RESTORE_SIGMASK</span></a><span class="f">)</span><span class="f">)</span>
<a name="259" /><span class="Maybe">     259:</span>         <span class="m">return</span> <span class="m">false</span><span class="f">;</span>
<a name="260" /><span class="Maybe">     260:</span>     <span class="b">ti</span><span class="f">-&gt;</span><span class="b">status</span> <span class="f">&amp;=</span> <span class="f">~</span><a href="cpu.c_macros_ref.html#_VFNfUkVTVE9SRV9TSUdNQVNLXzA_"><span class="b">TS_RESTORE_SIGMASK</span></a><span class="f">;</span>
<a name="261" /><span class="Maybe">     261:</span>     <span class="m">return</span> <span class="m">true</span><span class="f">;</span>
<a name="262" /><span class="Maybe">     262:</span> <span class="f">}</span>
<a name="263" /><span class="Maybe">     263:</span> 
<a name="264" /><span class="Maybe">     264:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">is_ia32_task</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="265" /><span class="Maybe">     265:</span> <span class="f">{</span>
<a name="266" /><span class="False">     266:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">CONFIG_X86_32</span>
<a name="267" /><span class="False">     267:</span>     <span class="m">return</span> <span class="m">true</span><span class="f">;</span>
<a name="268" /><span class="Maybe">     268:</span> <span class="f">#</span><span class="n">endif</span>
<a name="269" /><span class="Maybe">     269:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0lBMzJfRU1VTEFUSU9OXzA_"><span class="b">CONFIG_IA32_EMULATION</span></a>
<a name="270" /><span class="Maybe">     270:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">current_thread_info</span><span class="f">(</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">status</span> <span class="f">&amp;</span> <a href="cpu.c_macros_ref.html#_VFNfQ09NUEFUXzA_"><span class="b">TS_COMPAT</span></a><span class="f">)</span>
<a name="271" /><span class="Maybe">     271:</span>         <span class="m">return</span> <span class="m">true</span><span class="f">;</span>
<a name="272" /><span class="Maybe">     272:</span> <span class="f">#</span><span class="n">endif</span>
<a name="273" /><span class="Maybe">     273:</span>     <span class="m">return</span> <span class="m">false</span><span class="f">;</span>
<a name="274" /><span class="Maybe">     274:</span> <span class="f">}</span>
<a name="275" /><span class="Maybe">     275:</span> <span class="f">#</span><span class="n">endif</span>    <span class="k">/* !__ASSEMBLY__ */</span>
<a name="276" /><span class="Maybe">     276:</span> 
<a name="277" /><span class="Maybe">     277:</span> <span class="f">#</span><span class="n">ifndef</span> <span class="b">__ASSEMBLY__</span>
<a name="278" /><span class="Maybe">     278:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">arch_task_cache_init</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="279" /><span class="Maybe">     279:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">arch_dup_task_struct</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">dst</span><span class="f">,</span> <span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">src</span><span class="f">)</span><span class="f">;</span>
<a name="280" /><span class="Maybe">     280:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">arch_release_task_struct</span><span class="f">(</span><span class="m">struct</span> <span class="b">task_struct</span> <span class="f">*</span><span class="b">tsk</span><span class="f">)</span><span class="f">;</span>
<a name="281" /><span class="Maybe">     281:</span> <span class="f">#</span><span class="n">endif</span>
<a name="282" /><span class="True">     282:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* _ASM_X86_THREAD_INFO_H */</span>
<a name="283" /><span class="True">     283:</span> </pre>
  </body>
</html>
